import request from '@/utils/request'

export function listDiscount(query) {
  return request({
    url: '/discount/list',
    method: 'get',
    params: query
  })
}

export function createDiscount(data) {
  return request({
    url: '/discount/create',
    method: 'post',
    data
  })
}

export function readDiscount(id) {
  return request({
    url: '/discount/read',
    method: 'get',
    params: { id }
  })
}

export function updateDiscount(data) {
  return request({
    url: '/discount/update',
    method: 'post',
    data
  })
}

export function deleteDiscount(data) {
  return request({
    url: '/discount/delete',
    method: 'post',
    data
  })
}

